<?php $_categories = $this->getStoreCategories();
	$advancedmenus = $this->getAdvancedMenus();
?>
<?php if(count($_categories)): ?>
<div class="nav-container">
    <div id="custommenu">
        <?php if ($this->showHomeLink()) : ?>
        <div class="menu">
            <div class="parentMenu">
                <a href="<?php echo $this->getUrl('') ?>">
                    <span><?php echo $this->__('Home'); ?></span>
                </a>
            </div>
        </div>
        <?php endif ?>
		<?php 
			if($this->isCategoryMode() || $this->isBothMode()){
				foreach ($_categories as $_category){
					echo $this->drawCustomMenuItem($_category);
				}
			}
		?>
		<?php 
			if($this->isStaticBlokcMode() || $this->isBothMode()){
				foreach($advancedmenus as $advancedmenu){
					echo $this->drawBlockStatic($advancedmenu);
				}
			}
		?>
        <div class="clearBoth"></div>
    </div>
</div>
<script type="text/javascript">
//<![CDATA[
var CUSTOMMENU_POPUP_WIDTH = <?php echo (int)Mage::getStoreConfig('custom_menu/popup/width')?>;
var CUSTOMMENU_POPUP_TOP_OFFSET = <?php echo (int)Mage::getStoreConfig('custom_menu/popup/top_offset')?>;
var CUSTOMMENU_POPUP_RIGHT_OFFSET_MIN = <?php echo (int)Mage::getStoreConfig('custom_menu/popup/right_offset_min')?>;
//]]>
</script>
<?php endif ?>
